import { createApp } from 'vue'
import { createPinia } from 'pinia' // 引入 createPinia
import './style.css'
import App from "./App.vue"
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import router from "./routers/router"
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'dayjs/locale/zh-cn'
import dayjs from "dayjs";

dayjs.locale('zh-cn')
const app = createApp(App)
const pinia = createPinia() // 创建 Pinia 实例

app.use(ElementPlus,{
    locale:zhCn //设置Element Plus中文
})
app.use(router)
app.use(pinia) // 将 Pinia 安装为 Vue 插件
// 注册所有图标（全量）
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
